/**
 * 
 */
package com.naiterui.ehp.bs.recommend.bean;

import static javax.persistence.GenerationType.IDENTITY;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Version;

/**
 * 推荐用药处方诊断记录
 * @author guoyongxiang
 * @since 2.9.0
 */
@Entity
@Table(name = "dr_medication_recom_diagnosis")
public class DrMedicationRecomDiagnosis {

    /** 主键 */
    private Long id;
    /** 推荐ID */
    private Long recommendId;
    /** 诊断ID */
    private Long diagnosisId;
    /** 诊断名 */
    private String name;
    /** 诊断库类别 0:标准库, 1:自定义 */
    private Integer type;
    /** 创建时间 */
    private Date createdAt;
    /** 创建人 */
    private String createdBy;
    /** 修改时间 */
    private Date changedAt;
    /** 修改时间 */
    private String changedBy;
    /** 乐观锁 */
    private Integer version;

    public DrMedicationRecomDiagnosis() {
        super();
    }

    public DrMedicationRecomDiagnosis(Long recommendId, Long diagnosisId, String name, Integer type) {
        super();
        this.recommendId = recommendId;
        this.diagnosisId = diagnosisId;
        this.name = name;
        this.type = type;
        this.createdAt = new Date();
        this.createdBy = "recomSystem";
        this.changedAt = new Date();
        this.changedBy = "recomSystem";
    }

    @Id
    @Column(name = "id", unique = true, nullable = false)
    @GeneratedValue(strategy = IDENTITY)
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Column(name = "recommend_id")
    public Long getRecommendId() {
        return recommendId;
    }

    public void setRecommendId(Long recommendId) {
        this.recommendId = recommendId;
    }

    @Column(name = "diagnosis_id")
    public Long getDiagnosisId() {
        return diagnosisId;
    }

    public void setDiagnosisId(Long diagnosisId) {
        this.diagnosisId = diagnosisId;
    }

    @Column(name = "name")
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Column(name = "type")
    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    @Column(name = "created_at")
    public Date getCreatedAt() {
        return createdAt;
    }

    public void setCreatedAt(Date createdAt) {
        this.createdAt = createdAt;
    }

    @Column(name = "created_by")
    public String getCreatedBy() {
        return createdBy;
    }

    public void setCreatedBy(String createdBy) {
        this.createdBy = createdBy;
    }

    @Column(name = "changed_at")
    public Date getChangedAt() {
        return changedAt;
    }

    public void setChangedAt(Date changedAt) {
        this.changedAt = changedAt;
    }

    @Column(name = "changed_by")
    public String getChangedBy() {
        return changedBy;
    }

    public void setChangedBy(String changedBy) {
        this.changedBy = changedBy;
    }

    @Version
    public Integer getVersion() {
        return version;
    }

    public void setVersion(Integer version) {
        this.version = version;
    }
}
